$(document).ready(function() {
	$("#checkboxall").click(function() {
		var checked_status = this.checked;
		$("input[name=checkall]").each(function() {
			this.checked = checked_status;
		});
	});
});

function salaryAdd() {
	$.post("salaryAction!save", 
	{balance: $("#balance").val(),
	userid: $("#userid").val(),
	expend: $("#expend").val()}
	,function(response) {
		$("#rightside").html(response);
	});
}

function checkbalance(){
	var userid=$("#userid").val();
	var expend=$("#expend").val();
	$.post("salaryAction!checkbalance", 
			{userid: $("#userid").val()}			
			,function(response) {
				$("#rightside").html(response);	
				$("#userid").val(userid);
				$("#expend").val(expend);
//				$("#curbalance").val(response);
			});
}